package com.zephyr.vchcenter.util;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Map;

public class MethodReflectUtil {
   public Object reflectMethodByProp(String className,String methodName,Map[] paramters) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, InstantiationException{
	   Class clazz=Class.forName(className);
	   Object obj=null;
	   Method methods[]=clazz.getDeclaredMethods();
	   for(Method method:methods){
		   if(method.getName().equals(method)){
			   obj=method.invoke(clazz.newInstance(), paramters);
		   } 
	   }
	   return obj;
   }
}
